草庐IT

firebase - flutter NoSuchMethodError

全部标签

firebase - Flutter web : tried to call a non-function, 比如null : 'dart. global.firebase.storage

我正在使用适用于Web的Firebase插件并设法使用firestore和身份验证。现在,我正在尝试启用firebase存储,但是当我实例化Storage时出现此错误triedtocallanon-function,suchasnull:'dart.global.firebase.storage我使用的firestore和身份验证:import'package:firebase/firebase.dart'asfb;import'package:firebase/firestore.dart';fb.Auth_firebaseAuth=fb.auth();Firestore_fires

firebase - Flutter web : tried to call a non-function, 比如null : 'dart. global.firebase.storage

我正在使用适用于Web的Firebase插件并设法使用firestore和身份验证。现在,我正在尝试启用firebase存储,但是当我实例化Storage时出现此错误triedtocallanon-function,suchasnull:'dart.global.firebase.storage我使用的firestore和身份验证:import'package:firebase/firebase.dart'asfb;import'package:firebase/firestore.dart';fb.Auth_firebaseAuth=fb.auth();Firestore_fires

firebase - 从 Firestore Listen 回调返回列表

我在firebase中有一个函数,旨在获取名为history的集合中的所有文档,并将其添加到要返回的列表中。问题是,我认为这是因为.listen()是异步的,返回的列表总是空的。我知道数据查询正确,因为我可以在forEach函数中打印文档,但添加到外部列表不起作用。顺便说一下,myStream是FireStore中历史集合的快照。我的函数必须是Future吗?我怎样才能使这项工作?这是我的代码:ListgetHistory(Stringid){Listhistory;Firestore.instance.collection(id).snapshots().listen((data){

firebase - 从 Firestore Listen 回调返回列表

我在firebase中有一个函数,旨在获取名为history的集合中的所有文档,并将其添加到要返回的列表中。问题是,我认为这是因为.listen()是异步的,返回的列表总是空的。我知道数据查询正确,因为我可以在forEach函数中打印文档,但添加到外部列表不起作用。顺便说一下,myStream是FireStore中历史集合的快照。我的函数必须是Future吗?我怎样才能使这项工作?这是我的代码:ListgetHistory(Stringid){Listhistory;Firestore.instance.collection(id).snapshots().listen((data){

firebase-realtime-database - 使用flutter如何在同一个App中使用多个firebase实时数据库

我们正在使用firebase实时数据库在flutter中开发一个应用程序,为不同的客户提供多种服务。我想为每个使用相同firebase项目的客户提供不同的数据库。由于firebase在同一个项目中支持多个数据库,我相信可以使用FirebaseDatase插件来实现。我试图设置对辅助数据库的引用,但找不到解决命令来更改该数据库的实例。如果您使用的是Java或其他使用FirebaseSDK的语言,这非常简单,但我找不到使用Flutter的方法。FuturegetDbData(StringdbChildPath)async{DataSnapshot_objdatabase;try{await

firebase-realtime-database - 使用flutter如何在同一个App中使用多个firebase实时数据库

我们正在使用firebase实时数据库在flutter中开发一个应用程序,为不同的客户提供多种服务。我想为每个使用相同firebase项目的客户提供不同的数据库。由于firebase在同一个项目中支持多个数据库,我相信可以使用FirebaseDatase插件来实现。我试图设置对辅助数据库的引用,但找不到解决命令来更改该数据库的实例。如果您使用的是Java或其他使用FirebaseSDK的语言,这非常简单,但我找不到使用Flutter的方法。FuturegetDbData(StringdbChildPath)async{DataSnapshot_objdatabase;try{await

firebase - 如何在 Cloud Firestore 中使用 Stream 回调

我有几个问题(我是Dart的新手)w.r.t我在下面找到的代码。我想要达到的目标:1)错误多写在括号内一行。但我收到错误提示“setliteralsweresupportedupto2.2....”。知道可能的错误列表也很好,这样我就可以相应地提醒用户。2)增加一个与文档数量相关的计数器,并将文档ID保存在一个变量中,如果找到多个文档,则覆盖最后一个值。我正在尝试检查是否应该只有一个文档,并在计数器变为2时采取措施。void_checkIfAdmin(){Firestore.instance.collection('Admin').where('Email',isEqualTo:wid

firebase - 如何在 Cloud Firestore 中使用 Stream 回调

我有几个问题(我是Dart的新手)w.r.t我在下面找到的代码。我想要达到的目标:1)错误多写在括号内一行。但我收到错误提示“setliteralsweresupportedupto2.2....”。知道可能的错误列表也很好,这样我就可以相应地提醒用户。2)增加一个与文档数量相关的计数器,并将文档ID保存在一个变量中,如果找到多个文档,则覆盖最后一个值。我正在尝试检查是否应该只有一个文档,并在计数器变为2时采取措施。void_checkIfAdmin(){Firestore.instance.collection('Admin').where('Email',isEqualTo:wid

android - Flutter Firebase Error Null fundtion(FirebaseUser)无法分配给参数,仪表类型 FutureOr <dynamic>

在我的Firebase身份验证中,我遇到了错误:error:Theargumenttype'NullFunction(FirebaseUser)'can'tbeassignedtotheparametertype'FutureOrFunction(AuthResult)'.(argument_type_not_assignableat[authentication]lib\loginpage.dart:44)如果导入firebase_auth和flutterMaterialonPressed:(){FirebaseAuth.instance.signInWithEmailAndPass

android - Flutter Firebase Error Null fundtion(FirebaseUser)无法分配给参数,仪表类型 FutureOr <dynamic>

在我的Firebase身份验证中,我遇到了错误:error:Theargumenttype'NullFunction(FirebaseUser)'can'tbeassignedtotheparametertype'FutureOrFunction(AuthResult)'.(argument_type_not_assignableat[authentication]lib\loginpage.dart:44)如果导入firebase_auth和flutterMaterialonPressed:(){FirebaseAuth.instance.signInWithEmailAndPass